#@layout()
<script>
    $("#fairauth-add").validate({
        rules:{
                "fairauth.wh_id":{
                    required:true
                },
                "fairauth.user_name":{
                    required:true
                },
                "fairauth.nick_name":{
                    required:true
                },
                "fairauth.fans":{
                    required:true
                },
                "fairauth.screenshot":{
                    required:true
                },
                "fairauth.type":{
                    required:true
                },
                "fairauth.deletetag":{
                    required:true
                },
                "fairauth.status":{
                    required:true
                }
        },
        messages:{

                "fairauth.wh_id":{
                required:"请输入网红ID..."
                },
                "fairauth.user_name":{
                required:"请输入账号..."
                },
                "fairauth.nick_name":{
                required:"请输入昵称..."
                },
                "fairauth.fans":{
                required:"请输入粉丝数量..."
                },
                "fairauth.screenshot":{
                required:"请输入截图..."
                },
                "fairauth.type":{
                required:"请输入类型..."
                },
                "fairauth.deletetag":{
                required:"请输入删除标识..."
                },
                "fairauth.status":{
                required:"请输入状态..."
                }
        },
        onkeyup:false,
        focusCleanup:true,
        success:"valid",
        submitHandler:function(form){
        var config = {
        "url":"/admin/fairauth/doAdd",
        data:$("#fairauth-add").serialize(),
        "method":"POST"
        };
        var backendTool = new BackendTool(config);
        backendTool.ajaxRequest();
        }
    });
</script>
#define main()
     <form class="form form-horizontal" id="fairauth-add">
        #include("fairauth-form.html")
     </form>
#end